{% extends "../base_adminlte.html" %}
{% load custom_markdown %}
{% load widget_tweaks  %}
{% load staticfiles %}
{% block content %}
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
    <div class="content-header">
    </div>
  <section class="content">
   <form action="" role="search" method="get">
       <div class="input-group col-md-12">
        {% with form=filter.form %}
          {% for field in form.visible_fields %}
            <div class="form-group col-sm-4 col-md-4">
                {{ field.label_tag }}
                  {% render_field field %}
            </div>
           {% endfor %}
        {% endwith %}
        </div>
                       <button  type="submit" class="btn btn-primary" id="btn_search" data-toggle="modal"
                     data-target="#addModal" >查询</button>

      </form>
      <table class="table table-bordered" id="typetable">
          <tr style="font-weight: bold; background-color: #3c8dbc80;">
             <td align="center" style="white-space:nowrap;">ID</td>
             <td align="center" style="white-space:nowrap;">模板名称</td>
             <td align="center" style="white-space:nowrap;">任务函数</td>
             <td align="center" style="white-space:nowrap;">参数列表</td>
             <td align="center" style="white-space:nowrap;">备注</td>
          </tr>
        {% for t in page_obj %}
        <tr>
             <td style="white-space:nowrap;vertical-align:middle;">{{ t.id }}</td>
             <td style="white-space:nowrap;vertical-align:middle;">{{ t.Name }}</td>
             <td style="white-space:nowrap;vertical-align:middle;">{{ t.Shlrmethod }}</td>
             <td style="vertical-align:middle;"><p style="word-break:break-all;">{{ t.Argslist }}</p></td>
             <td style="vertical-align:middle;">{{ t.Remark }}</td>
        </tr>
        {% endfor %}
      </table>
<div  style="float:right;height: 200px;font-size:15px">
                 {#  #总条数#}
            <div  style="width: 90px;height: 50px;float:left;margin: 10px 0 0 1px">总记录<label>{{ filter.qs|length }}</label>条</div>
                {#  #总页码#}
            <div  style="width: 60px;height: 50px;float:left;margin: 10px 0 0 1px">共<label>{{ total }}</label>页</div>
                {#  #当前页码#}
               {# #首页#}

               <div  style="width: 30px;height: 50px;float:left;margin: 10px 0 0 1px">
                        <p><a href="?{% param_replace page=1 %}">首页</a></p>
               </div>
                {# #前一页#}
                <div style="width: 30px;height: 50px;float:left;margin: 10px 0 0 5px">
                   {% if page_obj.has_previous %}
                     <p><a href="?{% param_replace page=page_obj.previous_page_number %}">{{ page_obj.previous_page_number }}</a> </p>
                    {% endif %}
               </div>
                {##当前页页码#}
               <div  style="width: 30px;height: 50px;float:left;margin: 10px 0 0 1px">
                   <p> {{ page_obj.number }}</p>

               </div>
                {# #后一页#}
               <div style="width: 30px;height: 50px;float:left;margin: 10px 0 0 1px">
               {% if page_obj.has_next %}
                   <p><a class="page-link" href="?{% param_replace page=page_obj.next_page_number %}">{{ page_obj.next_page_number }}</a></p>
                {% endif %}
               </div>
                {##尾页#}
                 <div  style="width: 30px;height: 50px;float:left;margin: 10px 0 0 1px">
                        <p><a href="?{% param_replace page=total %}">尾页</a> </p>
               </div>
  </div>
  </section>
</div>
<style type="text/css">
  td {
    background-color: #dadbdb80;
  }
</style>
{% endblock %}

